package com.ruoyi.project.posts.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.posts.mapper.LblCsDealClassifyMapper;
import com.ruoyi.project.posts.domain.LblCsDealClassify;
import com.ruoyi.project.posts.service.ILblCsDealClassifyService;

/**
 * 二手交易商品分类Service业务层处理
 * 
 * @author BaoL
 * @date 2023-03-26
 */
@Service
public class LblCsDealClassifyServiceImpl implements ILblCsDealClassifyService 
{
    @Autowired
    private LblCsDealClassifyMapper lblCsDealClassifyMapper;

    /**
     * 查询二手交易商品分类
     * 
     * @param id 二手交易商品分类ID
     * @return 二手交易商品分类
     */
    @Override
    public LblCsDealClassify selectLblCsDealClassifyById(Long id)
    {
        return lblCsDealClassifyMapper.selectLblCsDealClassifyById(id);
    }

    /**
     * 查询二手交易商品分类列表
     * 
     * @param lblCsDealClassify 二手交易商品分类
     * @return 二手交易商品分类
     */
    @Override
    public List<LblCsDealClassify> selectLblCsDealClassifyList(LblCsDealClassify lblCsDealClassify)
    {
        return lblCsDealClassifyMapper.selectLblCsDealClassifyList(lblCsDealClassify);
    }

    /**
     * 新增二手交易商品分类
     * 
     * @param lblCsDealClassify 二手交易商品分类
     * @return 结果
     */
    @Override
    public int insertLblCsDealClassify(LblCsDealClassify lblCsDealClassify)
    {
        lblCsDealClassify.setCreateTime(DateUtils.getNowDate());
        return lblCsDealClassifyMapper.insertLblCsDealClassify(lblCsDealClassify);
    }

    /**
     * 修改二手交易商品分类
     * 
     * @param lblCsDealClassify 二手交易商品分类
     * @return 结果
     */
    @Override
    public int updateLblCsDealClassify(LblCsDealClassify lblCsDealClassify)
    {
        lblCsDealClassify.setUpdateTime(DateUtils.getNowDate());
        return lblCsDealClassifyMapper.updateLblCsDealClassify(lblCsDealClassify);
    }

    /**
     * 批量删除二手交易商品分类
     * 
     * @param ids 需要删除的二手交易商品分类ID
     * @return 结果
     */
    @Override
    public int deleteLblCsDealClassifyByIds(Long[] ids)
    {
        return lblCsDealClassifyMapper.deleteLblCsDealClassifyByIds(ids);
    }

    /**
     * 删除二手交易商品分类信息
     * 
     * @param id 二手交易商品分类ID
     * @return 结果
     */
    @Override
    public int deleteLblCsDealClassifyById(Long id)
    {
        return lblCsDealClassifyMapper.deleteLblCsDealClassifyById(id);
    }
}
